package serviceimpl;

import dao.DishDAO;
import model.Dish;
import service.DishService;

import java.util.List;

/**
 * Created by admin on 2016/8/15.
 */


public class DishServiceImpl implements DishService {
    private DishDAO dishDAO;
    public Dish findById(int id) {
        return dishDAO.findById(id);
    }

    public List findAll() {
        return dishDAO.findAll();
    }

    @Override
    public void saveDish(Dish dish) {
        dishDAO.save(dish);
    }

    public void setDishDAO(DishDAO dishDAO) {
        this.dishDAO = dishDAO;
    }
}
